package com.llb666.e.shop.infrastructure.mapper;

import com.llb666.e.shop.api.vo.MyOrdersVo;
import com.llb666.e.shop.domain.entity.OrderStatus;
import com.llb666.e.shop.infracore.mapper.MyMapper;
import com.llb666.e.shop.infrastructure.po.OrdersPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface OrdersMapper extends MyMapper<OrdersPo> {
    
    public List<MyOrdersVo> queryMyOrders(@Param("paramsMap") Map<String, Object> map);

    public int getMyOrderStatusCounts(@Param("paramsMap") Map<String, Object> map);

    public List<OrderStatus> getMyOrderTrend(@Param("userId")String userId);

    List<MyOrdersVo> getOrderByUserIdAndStatus(@Param("userId")String userId,
                                               @Param("orderStatus")Integer orderStatus);
}